<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统-城市管理</title>

<link rel="stylesheet" type="text/css" href="resources/css/image.css">
<%@ include  file="includes/icon.html" %>
</head>
<body>

   <div class="headbar">
        
   </div>
   <div class="linkbar">
     <div>
        <span style="display:inline-block;width:80%;float:left;color:white;line-height:40px;">
            <a class="linkbar_a" href="admin/searchHealthUser">数据手工录入</a> | <a class="linkbar_a" href="admin/queryAutoInput">数据自动录入</a> 
        </span>
        <span style="display:inline-block;width:20%;float:right;color:white;line-height:40px;">
            <a class="linkbar_a" href="doctor/diagnoseBrainTumour" style="float:right;padding-right:30px">在线诊断</a>
        </span>
       </div> 
   </div>
   <div class="body">
       
         <table class="body">
           <tr>
              <td class="nav_list"  valign="top">
                <div> 
                   <dl class="nav_list">
                      <dd class="no-selected" ><a href="admin/searchHealthUser">病人信息</a></dd>
                      <dd class="selected" ><a href="admin/queryMedicalCase">疾病实例</a></dd>
                      <dd class="no-selected" ><a href="admin/queryTreatmentMethod">治疗方法</a></dd>
                      <dd class="no-selected" ><a href="admin/queryDesease">疾病表</a></dd>
                      <dd class="no-selected" ><a href="admin/queryFeature">特征表</a></dd>
                      <dd class="no-selected" ><a href="admin/queryLabSheet">化验单定义</a></dd>
                      <dd class="no-selected" ><a href="admin/queryLabSheetResult">化验单结果</a></dd>
                      <dd class="no-selected" ><a href="admin/queryMedicine">药物表</a></dd>
                      <dd class="no-selected" ><a href="admin/querySystemUser">系统用户</a></dd>
                      <dd class="no-selected" ><a href="admin/queryCity">城市表</a></dd>
                      <dd class="no-selected" ><a href="admin/queryOccupation">职业表</a></dd>
                      <dd class="no-selected" ><a href="admin/queryBodyPart">身体部位表</a></dd>
                   </dl>
                </div>
              </td>
              <td class="content" valign="top">
                    <div class="search_bar"> 
	                   
	                    <span class="search_condition">
	                       <div style="width:100%;margin-left:30px;margin-top:20px;">
	                           <font>病例编号： </font><span  style="width:150px;" >${condition.case_id}</span><br>
	                           <font>病人名称： </font><span  style="width:150px;" >${condition.patientName}</span><br>
	                           <font>疾病名称： </font><span  style="width:150px;" >${condition.deseaseName}</span>
	                       </div>
	                    </span>
	                    <span class="search_button">
                           <div  class="search_button" ><a href="admin/queryMedicalCase">返回病例列表</a></div>
                        </span>
                    </div>
                    
               
                    <script language="javascript"> 
                    var isShown = [false,false,false];
                    function clickAddDiv(index)
                    {
                    	if (isShown[index] == false)
                    	{	
                    		showAddDiv(index);
                    		
                    	}
                    	else
                    	{
                    		hideAddDiv(index);
                    	}
                    }
					function showAddDiv(index) {

					  d=document.getElementById("add_new_image_"+index);
					  d.style.display="inline-block";
					  
					  isShown[index] =true;
					}
					function hideAddDiv(index) {

						  d=document.getElementById("add_new_image_"+index);
						  d.style.display="none";
						  isShown[index] = false;
				    }
					
				 </script> 
                  
                  <!-- MRI -->
                  <div class="status_bar">
                    <div style="display:block;float:left">MRI核磁共振：</div>   <div class="add_new_button" onClick="clickAddDiv(1)" >添加+</div>
                 </div>
                 <div class="add_new_health_user" id="add_new_image_1">
                     <sf:form action="admin/uploadImage" method="POST" modelAttribute="new_image" enctype="multipart/form-data" id="form1"> 
                    <span class="add_new_health_user">
                        <div style="width:100%;margin-left:30px;margin-top:17px;">
                                  <sf:hidden path="case_id" value="${new_image.case_id}"/>
                                  <sf:hidden path="type" value="1"/>
                                  <font>选择图片:</font><input id="imageFile" name="imageFile" type="file" />
                        </div>
                    </span>
                    <span class="add_button">
                          <input type="submit" class="add_button" value="上传" />
                          <div class="add_button">
                              <font style="color:blue;font-size:15px;" onclick="hideAddDiv(1)" >取消</font>
                          </div>
                    </span>
                    </sf:form>
                  </div>
                  
                  <div class="information" id="information">
                     ${information1} 
                  </div>
                  
                  
                  <div class="user_list">
                     <div class="row"> 
                           <div style="width:20px;height:1px;display:inline-block;">
                                
                           </div>
                         
                          <c:forEach var = "mri_image_item"   items= "${mri_image_list}">
                              <div style="width:150px;height:180px;display:inline-block;">
                                  <img src="${mri_image_item.image_url}" width="100%" height="150" />
                                   <br>
                                   <div style="width:150px;height:28px;line-height:28px;text-align:center;font-size:12px;">
                                       <a style="TEXT-DECORATION: none;" href="admin/deleteImage?image_def_id=${mri_image_item.image_def_id}&case_id=${mri_image_item.case_id}&type=${mri_image_item.type}">删除</a>
                              	   </div> 
                              </div>
                                      
                           
                          </c:forEach>
                     </div>
                  </div>
                  
                  
                  <!-- CT影像 -->
                  
                  <div class="status_bar"  >
                    <div style="display:block;float:left">CT影像：</div>   <div class="add_new_button" onClick="clickAddDiv(2)" >添加+</div>
                 </div>
                 <div class="add_new_health_user" id="add_new_image_2">
                     <sf:form action="admin/uploadImage" method="POST" modelAttribute="new_image" enctype="multipart/form-data" id="form2"> 
		                    <span class="add_new_health_user">
		                        <div style="width:100%;margin-left:30px;margin-top:17px;">
		                                  <sf:hidden path="case_id" value="${new_image.case_id}"/>
		                                  <sf:hidden path="type" value="2"/>
		                                  <font>选择图片:</font><input name="imageFile" type="file" />
		                        </div>
		                    </span>
		                    <span class="add_button">
		                          <input type="submit" class="add_button" value="上传" />
		                          <div class="add_button">
		                              <font style="color:blue;font-size:15px;" onclick="hideAddDiv(2)" >取消</font>
		                          </div>
		                    </span>
                    </sf:form>
                  </div>
                  
                  <div class="information" id="information">
                     ${information2} 
                  </div>
                  
                  
                  <div class="user_list">
                     <div class="row"> 
                          <div style="width:20px;height:1px;display:inline-block;">
                                
                           </div>
                          <c:forEach var = "ct_image_item"   items= "${ct_image_list}">
                              <div style="width:150px;height:150px">
                                  <img src="${ct_image_item.image_url}" width="100%" height="100%" />
                                  <br>
       							   <div style="width:150px;height:28px;line-height:28px;text-align:center;font-size:12px;">
                                       <a style="TEXT-DECORATION: none;" href="admin/deleteImage?image_def_id=${mri_image_item.image_def_id}&case_id=${mri_image_item.case_id}&type=${mri_image_item.type}">删除</a>
                              	   </div> 
       							 </div>
                          </c:forEach>
                     </div>
                  </div>
                  
                  <!-- 3D-CT影像 -->
                  <div class="status_bar" >
                    <div style="display:block;float:left"> 3D-CT影像：</div>   <div class="add_new_button" onClick="clickAddDiv(3)" >添加+</div>
                 </div>
                 <div class="add_new_health_user" id="add_new_image_3">
                     <sf:form action="admin/uploadImage" method="POST" modelAttribute="new_image" enctype="multipart/form-data" id="form3"> 
                    <span class="add_new_health_user">
                        <div style="width:100%;margin-left:30px;margin-top:17px;">
                                  <sf:hidden path="case_id" value="${new_image.case_id}"/>
                                  <sf:hidden path="type" value="1"/>
                                  <font>选择图片:</font><input name="imageFile" type="file" />
                        </div>
                    </span>
                    <span class="add_button">
                          <input type="submit" class="add_button" value="上传" />
                          <div class="add_button">
                              <font style="color:blue;font-size:15px;" onclick="hideAddDiv(3)" >取消</font>
                          </div>
                    </span>
                    </sf:form>
                  </div>
                  
                  <div class="information" id="information">
                     ${information3} 
                  </div>
                  
                  
                  <div class="user_list" >
                     <div class="row"> 
                          <c:forEach var = "ct3d_image_item"   items= "${ct3d_image_list}">
                              <div style="width:150px;height:150px">
                                  <img src="${ct3d_image_item.image_url}" width="100%" height="100%" />
                              </div>
                          </c:forEach>
                     </div>
                  </div>
                  
              </td>
           </tr>
         </table>
       
   </div>
   <div class="bottom">
   
   </div>

   
</body>
</html>